package javaoop第二章;


     
	public class Dog{
	String strain;
	String color;
	String nickName;
	int age;
	public void barking() {
		System.out.println("汪汪。。");
	}
	public void eat() {
		System.out.println("敲代码。。。");
	}
	public void sleeping() {
		System.out.println("正在睡觉。。");
	}
	public void show() {
		System.out.println("昵称："+this.nickName);
		System.out.println("品种："+this.strain);
		System.out.println("年龄："+this.age);
		System.out.println("颜色："+this.color);
	}
	
	public static void main(String[]age) {
		Dog dog1=new Dog();
		dog1.nickName="旺财";
		dog1.age=3;
		dog1.strain="聪明的拉布拉多";
		dog1.color="黑色";
		dog1.show();
		dog1.barking();
			
	}
	
	}

